﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Web4Comment.Service
{
    interface ISNSService
    {
        /// <summary>
        /// 授权SNS网站
        /// </summary>
        /// <param name="SNSWeb">网站名称</param>
        /// <returns>成功</returns>
        int authorize(int SNSWeb);

       /// <summary>
       /// 保存用户连接信息
       /// </summary>
       /// <param name="sid">sns站的id</param>
       /// <param name="user_id">本站的uid</param>
        void saveUserSite(int sid, int user_id);

        int connect(int SNSWeb);

        /// <summary>
        /// 是否连接到id=sid 的sns
        /// </summary>
        /// <param name="sid"></param>
        /// <returns></returns>
        bool isConnect(int sid);

        /// <summary>
        /// 用户user_id是否注册到sid站
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="sid"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        UnlessComment.Model.UserSite isSaveUserSite(int sid, int user_id);

        /// <summary>
        /// 获得在sid中uid在本站的id，不存在返回-1
        /// </summary>
        /// <param name="sid"></param>
        /// <param name="uid"></param>
        /// <returns></returns>
        UnlessComment.Model.UserSite getUserInSiteByUid(int sid, long uid);

        /// <summary>
        /// 获得SNS的access token
        /// </summary>
        /// <param name="sns"></param>
        /// <param name="code"></param>
        /// <param name="user_id"></param>
        void getAccessToken(int sns, string code, int user_id);

        /// <summary>
        /// 获取授权网站好友
        /// </summary>
        /// <param name="SNSWeb">授权网站名称</param>
        /// <returns>好友列表自动添加,返回数据类型待商榷</returns>
        List<UnlessComment.Model.SnsFriend> getNewSNSFriends(int SNSWeb);

        

        
    }
}
